package com.meichuang.meipian.video.music;

import org.json.JSONObject;

/**
 * Created by ken on 17/11/12.
 */

public class MusicModel {
    public String audioFilePath;
    public String audioKey;
    public float audioVolume;
    public Boolean isAdd;
    public Boolean isLoop;
    public int startFps;
    public int endFps;

    public void valueFromJson(String json){
        try {
            JSONObject object=new JSONObject(json);
            audioFilePath = object.getString("audioFilePath");;
            audioKey = object.getString("audioKey");;
            audioVolume = (float)object.getDouble("audioVolume");;
            isAdd = object.getBoolean("isAdd");;
            isLoop = object.getBoolean("isLoop");;
            startFps = object.getInt("startFps");;
            endFps = object.getInt("endFps");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
